import request from '@/utils/request'
import { technicalApiUrl } from './config'
/**
 * 竣工台账列表
 */
export function getDataList(data) {
  return request({
    url: technicalApiUrl + '/technical/platform-account',
    method: 'post',
    data: data
  })
}

export function getDataDetail(data) {
  return request({
    url: `${technicalApiUrl}/technical/detailed`,
    method: 'get',
    params: data
  })
}
//打印
export function print(query) {
  return request({
    url: technicalApiUrl + '/technical/print',
    method: 'get',
    params: query
  })
}

export function getRightList(data) {
  return request({
    url: `${technicalApiUrl}/technical/account-detailed`,
    method: 'get',
    params: data
  })
}

export function editDataInfo(data) {
  return request({
    url: `${technicalApiUrl}/technical/account-table`,
    method: 'post',
    data
  })
}
//竣工列表删除
export function listDelete(data) {
  return request({
    url: `${technicalApiUrl}/technical/account/del`,
    method: 'post',
    params: data
  })
}
//竣工新增资料
export function increase(data) {
  return request({
    url: `${technicalApiUrl}/technical/account`,
    method: 'post',
    data: data
  })
}
//竣工新增资料
export function getDataInfo(data) {
  return request({
    url: `${technicalApiUrl}/technical/detailed`,
    method: 'get',
    params: data
  })
}

//竣工新增资料
export function saveData(data) {
  return request({
    url: `${technicalApiUrl}/technical/account/update`,
    method: 'post',
    data
  })
}
//竣工台账模板
export function getLeftList() {
  return request({
    url: `${technicalApiUrl}/technical/template-row`,
    method: 'get'
  })
}

//竣工台账模板
export function getSelectList() {
  return request({
    url: `${technicalApiUrl}/technical/template-row-lable`,
    method: 'get'
  })
}
//竣工台账模板
export function addClassify(data) {
  return request({
    url: `${technicalApiUrl}/technical/template-row`,
    method: 'post',
    data: data
  })
}
//竣工台账模板
export function editClassify(data) {
  return request({
    url: `${technicalApiUrl}/technical/template-row/update`,
    method: 'post',
    data: data
  })
}
//竣工台账模板修改资料
export function editData(data) {
  return request({
    url: `${technicalApiUrl}/technical/template-table/update`,
    method: 'post',
    data: data
  })
}

//竣工台账模板修改资料
export function addData(data) {
  return request({
    url: `${technicalApiUrl}/technical/template-table`,
    method: 'post',
    data: data
  })
}

//竣工台账模板管理列表/二级表格（右边）
export function getDataRightList(data) {
  return request({
    url: `${technicalApiUrl}/technical/template-table`,
    method: 'get',
    params: data
  })
}

//竣工台账模板管理列表/二级表格（右边）
export function deleteData(data) {
  return request({
    url: `${technicalApiUrl}/technical/template-table/del`,
    method: 'post',
    params: data
  })
}

/**
 * 竣工台账统计
 */
export function getTotalCount(data) {
  return request({
    url: technicalApiUrl + '/technical/count',
    method: 'post',
    data
  })
}
